import api from './axios'
import {objToQuery} from '../utils/common'

export const getStoresAPI = async (obj) => {
  try {
    const {totalCount, stores} = await api('store/GetStores', {
      method: 'POST',
      data: objToQuery(obj)
    })
    return {
      totalCount, stores
    }
  } catch (e) {
    throw e
  }
}
